/**
*  \file control_precharge.h
*
*  \brief
*
*  \author Michael J. Hohmann  michael.hohmann@linde-mh.de
*
*
*
*
*
*/
#ifndef CONTROL_PRECHARGE_H_INCLUDED
#define CONTROL_PRECHARGE_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"

/*================================================[ public defines   ]================================================*/

BO bK1wireError;

struct precharge_result
{
	S16 complete_charge;
	S16 start_charge;
	S16 discharge_flag;
	S16 complete_discharge;
	
};
struct precharge_error
{
	S16 charge_error;
	S16 discharge_error;
	
};
struct discharge_control
{
	S16	   trac_PwmEna;
	S16    trac_CmdEnable;
	S16	   trac_discharge;

    S16	   pump_pwmEnabl;
	S16    pump_Enable;
	S16    pump_motor_discharge;
};


struct precharge_result pR;
struct precharge_error  pError;
struct discharge_control dis_ctrl;
/*================================================[ public datatypes ]================================================*/

/*================================================[ public variables ]================================================*/

/*================================================[ inline functions ]================================================*/

/*================================================[ public functions ]================================================*/
/**
*  Initialization.
*
*  Initialize the control_precharge module.
*
*  \return RC_SUCCESS if successful.
*/
RC control_precharge_initialize( void );

/**
**/
BO precharge_10ms(F32 ucapVol,F32 batVol);

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2020 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
